home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: replace JDK compiler~displays a open file dialog to let you select
- a replacement for your JDK compiler. Note that this will only work if the new
- compiler uses the -classpath and -d command line options.
- @EndTip:
- @EndTool:
- @Summary: replace JDK compiler~lets you choose a replacement for you JDK compiler
- */
-
- var gOutput = getOutput();
- var gHelpers = getMapFile("ApplicationHelpers");
- var gOptions = getMapFile("JDKToolsStandardOptions");
-
- function DoCommand()
- {
- var compilePath = gHelpers.lookup("jdk-compiler", "");
- if (compilePath.exists)
- {
- if (confirm("Your current compiler is: \"" + compilePath.path +
- "\". Do you want to choose a new compiler?"))
- {
- SetNewCompiler();
- }
- }
- }
-
- function SetNewCompiler()
- {
- gOutput.clear();
- var compilePath = chooseFile("Locate your new compiler", "*.exe", "*.exe");
- if (compilePath && compilePath.exists)
- {
- gHelpers.add("jdk-compiler_release", compilePath);
- gHelpers.add("jdk-compiler_debug", compilePath);
- gHelpers.add("jdk-compiler", compilePath);
- gOutput.writeLine("Your new compiler is: " + compilePath.path);
- }
- }
-
- !!/Script
-